package join;

public class ThreadJoin {
    public static void main(String[] args) throws InterruptedException {
        Thread t = new MyThread("线程1:");
        t.start();
        t.join();//join之后会导致当前线程必须执行完成才能继续执行主线程，
        System.out.println("---------");//主线程
    }
}
